package com.dao.impl;

import com.dao.OrderDao;
import com.pojo.Order;
import com.web.BaseServlet;

/**
 * @Author hjb
 * @Version 1.0
 * @Contact 1754729389@qq.com
 */
public class OrderDaoImpl extends BaseDao implements OrderDao {
    @Override
    public int saveOrder(Order order) {

        String sql = "INSERT INTO orders(order_id,createTime,price,`type`,user_id)\n" +
                "VALUES(?,?,?,?,?)";

        return update(sql,order.getOrderId(),order.getCreateTime(),order.getPrice(),order.getType(),order.getUserId());
    }

    @Override
    public int selectOrder(Integer id) {
        return 0;
    }
}
